home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / arexx / cg / dos_command.rexx < prev    next >
OS/2 REXX Batch file  |  1995-01-05  |  551b  |  29 lines

  1. /* Run AmigaDOS command from within CG
  2. * By Arnie Cachelin © 1994 NewTek, Inc. */
  3.  
  4. call addlib(CG_AREXX,0)
  5.  
  6. filnam = 'ENV:DOS_Command.state'
  7. version = 'DOS_Command v1.0'
  8.  
  9. if (exists(filnam)) then do
  10.     if (~open(state, filnam, 'R')) then break
  11.     if (readln(state) ~= version) then break
  12.     Cmd=readln(state)
  13.     end
  14.     call close state
  15.  
  16. Cmd=REQ_STRING("DOS Command:",Cmd)
  17.  
  18. if (open(state, filnam, 'W')) then do
  19.     call writeln state, version
  20.     call writeln state, Cmd
  21.     call close state
  22. end
  23.  
  24. address command cmd
  25.  
  26. call remlib(CG_AREXX)
  27. exit
  28.  
  29.